@extends('Home.HomePublic.public')
@section('content')
<div class="container">
<div class="row">
<div class="tag-box">
    <table class="table" style="margin-bottom:10px;">
        <tbody>
        <tr>
            <td class="tag-span2">影视年份：</td>
            <td class="tags">
                <!-- <button href="" class=" tag" value="{{$id}}">全部</a> -->
                @foreach($year as $row)
                 @if($row->status==0)
                <button href="" class="ff tag" value="{{$row->name}}">{{$row->name}}</button>
                @endif
                @endforeach
            </td>
        </tr>
        <tr>
            <td class="tag-span2">国家地区：</td>
            <td class="tags">
               <!-- <button href="" class="dd tag" value="{{$id}}">全部</a> -->
                @foreach($regoin as $row)
                 @if($row->status==0)
                <button href="" class="dd tag" value="{{$row->name}}">{{$row->name}}</button>
                <input type="hidden" name="region" value="{{$row->name}}">
                @endif
                @endforeach
            </td>
        </tr>
        <tr style="border-bottom:1px solid #DDD;">
            <td class="tag-span2">影视类型：</td>
            <td class="tags">
                <!-- <button href="" class="cc tag" value="{{$id}}">全部</button> -->
                @foreach($data as $row)
                <button href="" class="cc tag" value="{{$row->name}}">{{$row->name}}</button>
                @endforeach
            </td>
        </tr>
        <!-- <tr>
            <td class="tag-span2">排序方法：</td>
            <td class="tags">
                <a href="/whole/1_______0_id__1.html" class="tag active" data-value="最新">最新</a>
                <a href="/whole/1_______0_rhits__1.html" class="tag" data-value="日榜">日榜</a>
                <a href="/whole/1_______0_zhits__1.html" class="tag" data-value="周榜">周榜</a>
                <a href="/whole/1_______0_yhits__1.html" class="tag" data-value="月榜">月榜</a>
                <a href="/whole/1_______0_hits__1.html" class="tag" data-value="总榜">总榜</a>
            </td>
        </tr> -->
        </tbody>
    </table>
</div>

<div class="col-xs-12" style="padding:0 5px;" id="ship">
   
    
        
</div>

<!-- <div class="pager-bg">
    <ul class="pagination pagination-sm">
    
        <li class='am-active'>
            <a href='/whole/1_______0_addtime_1.html'>1</a>
        </li>
        <li>
            <a href='/whole/1_______0_addtime_2.html'>2</a>
        </li>
        <li>
            <a href='/whole/1_______0_addtime_3.html'>3</a>
        </li>
    
        <li><a href="/whole/1_______0_addtime_2.html" rel="next">下一页</a></li>
        <li><a href="/whole/1_______0_addtime_3.html">末页</a></li>
    
    </ul>
</div> -->
</div>
<input id="url" type="hidden" name="id" value="{{$id}}">
<script type="text/javascript" src="../home/show/js/jquery.min.js"></script>
<script type="text/javascript">
    var id = $('#url').val();
    $.get('/getvalue',{id:id},function(data){
        // alert(data);
        data = eval(data);
        console.log(data)
             var info;
             for (var i = 0; i < data.length; i++) {

                 info += '<div class="col-xs-1-5 col-sm-4 col-xs-6 movie-item"><div class="movie-item-in"><a style="position:relative;display:block;" title="'+data[i].name+'" target="_blank" href="/show/'+data[i].id+'"><img alt="'+data[i].name+'" title="'+data[i].name+'" src="../uploads/video/'+data[i].pic+'"><span class="qtag hdtag"></span><div class="item-hover"></div></a><div class="meta"><h1><a href="/783/783.html" target="_blank" title="'+data[i].name+'">'+data[i].name+'</a><em> - '+data[i].year+'</em></h1><div class="otherinfo">类型：'+data[i].type+'</div></div></div></div>';
             }
             $('#ship').append(info);
     $("#ship").html($("#ship").html().replace(/undefined/,"")); 
    })
    // undefined
     // $('#ship')
    $('.ff').click(function(){
        var id = $('#url').val();
        // alert(id);
        $("#ship").empty();
        var year = $(this).val();
        // alert(year);
        $.get('/getvalue',{year:year},function(data){
            // alert(data);
            
            data = eval(data);
        console.log(data)

             var info;
             for (var i = 0; i < data.length; i++) {

                 info += '<div class="col-xs-1-5 col-sm-4 col-xs-6 movie-item"><div class="movie-item-in"><a style="position:relative;display:block;" title="'+data[i].name+'" target="_blank" href="/show/'+data[i].id+'"><img alt="'+data[i].name+'" title="'+data[i].name+'" src="../uploads/video/'+data[i].pic+'"><span class="qtag hdtag"></span><div class="item-hover"></div></a><div class="meta"><h1><a href="/783/783.html" target="_blank" title="'+data[i].name+'">'+data[i].name+'</a><em> - '+data[i].year+'</em></h1><div class="otherinfo">类型：'+data[i].type+'</div></div></div></div>';
             }
             $('#ship').append(info);
     $("#ship").html($("#ship").html().replace(/undefined/,"")); 

        });
        
    });


     $('.dd').click(function(){
        
        $("#ship").empty();
        var region = $(this).val();
        // alert(region);
        $.get('/getvalue',{region:region},function(data){
            // alert(data);
            
            data = eval(data);
             var info;
             for (var i = 0; i < data.length; i++) {

                 info += '<div class="col-xs-1-5 col-sm-4 col-xs-6 movie-item"><div class="movie-item-in"><a style="position:relative;display:block;" title="'+data[i].name+'" target="_blank" href="/show/'+data[i].id+'"><img alt="'+data[i].name+'" title="'+data[i].name+'" src="../uploads/video/'+data[i].pic+'"><span class="qtag hdtag"></span><div class="item-hover"></div></a><div class="meta"><h1><a href="/783/783.html" target="_blank" title="'+data[i].name+'">'+data[i].name+'</a><em> - '+data[i].year+'</em></h1><div class="otherinfo">类型：'+data[i].type+'</div></div></div></div>';
             }
             $('#ship').append(info);
     $("#ship").html($("#ship").html().replace(/undefined/,"")); 
             
        });
        
    });

     $('.cc').click(function(){
        
        $("#ship").empty();
        var type = $(this).val();
        // alert(type);
        $.get('/getvalue',{type:type},function(data){
            // alert(data);
            
            data = eval(data);
             var info;
             for (var i = 0; i < data.length; i++) {

                 info += '<div class="col-xs-1-5 col-sm-4 col-xs-6 movie-item"><div class="movie-item-in"><a style="position:relative;display:block;" title="'+data[i].name+'" target="_blank" href="/show/'+data[i].id+'"><img alt="'+data[i].name+'" title="'+data[i].name+'" src="../uploads/video/'+data[i].pic+'"><span class="qtag hdtag"></span><div class="item-hover"></div></a><div class="meta"><h1><a href="/783/783.html" target="_blank" title="'+data[i].name+'">'+data[i].name+'</a><em> - '+data[i].year+'</em></h1><div class="otherinfo">类型：'+data[i].type+'</div></div></div></div>';
             }
             $('#ship').append(info);
              $("#ship").html($("#ship").html().replace(/undefined/,"")); 
        });
        
    });
    // alert($);
</script>
    <script src="../home/show/js/jquery.min.js"></script>
    <script src="../home/show/js/bootstrap.min.js"></script>
    <script src="../home/show/js/main.js"></script>
@endsection